package com.hc.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author hecai
 * @date 2021/12/7 15:10
 * 商品表（SPU）
 */
@ApiModel(value = "com-hc-domain-Spu")
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_spu")
public class Spu implements Serializable {
    private static final long serialVersionUID = 215782422018574164L;
    /**
     * 商品编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "商品编号")
    private Integer id;

    /**
     * 商品名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "商品名称")
    private String name;

    /**
     * 副标题
     */
    @TableField(value = "caption")
    @ApiModelProperty(value = "副标题")
    private String caption;

    /**
     * 商品属性列表
     */
    @TableField(value = "specs")
    @ApiModelProperty(value = "商品属性列表")
    private String specs;

    /**
     * 单位
     */
    @TableField(value = "unit")
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 热度：点击数量
     */
    @TableField(value = "hot")
    @ApiModelProperty(value = "热度：点击数量")
    private Integer hot;
    /**
     * 类别编号
     */
    @TableField(value = "category_id")
    @ApiModelProperty(value = "类别编号")
    private Integer categoryId;

    /**
     * 品牌编号
     */
    @TableField(value = "brand_id")
    @ApiModelProperty(value = "品牌编号")
    private Integer brandId;

    /**
     * 用户对这一类商品的评论个数
     */
    @TableField(value = "comments")
    @ApiModelProperty(value = "用户对这一类商品的评论个数")
    private Integer comments;

    /**
     * 用户对这一类商品的点赞个数
     */
    @TableField(value = "agrees")
    @ApiModelProperty(value = "用户对这一类商品的点赞个数")
    private Integer agrees;

    /**
     * 状态 1上架  2下架
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "状态 1上架  2下架")
    private Integer status;

    /**
     * 售后服务
     */
    @TableField(value = "service")
    @ApiModelProperty(value = "售后服务")
    private String service;

    /**
     * 备注
     */
    @TableField(value = "info")
    @ApiModelProperty(value = "备注")
    private String info;

    /**
     * 县区编号
     */
    @TableField(value = "country_id")
    @ApiModelProperty(value = "县区编号")
    private Integer countryId;

    /**
     * 具体产地
     */
    @TableField(value = "addr")
    @ApiModelProperty(value = "具体产地")
    private String addr;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = " 创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = " 更新时间")
    private LocalDateTime updateTime;

}